home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW etc / MPW-GM / MPW / Examples / CFMExamples / ModApp / ModuleSources / Simple.c < prev   
Encoding:
C/C++ Source or Header  |  1998-12-03  |  1.8 KB  |  110 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        Simple.c
  3.  
  4.     Contains:    simple plug-in.
  5.  
  6.     Written by:    Richard Clark
  7.  
  8.     Copyright:    © 1993-1994 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.             8/15/94        BLS        updated to CFM-68K runtime
  13.  
  14. */
  15.  
  16.  
  17. #ifdef THINK_C
  18.     #define ToolStartup main
  19. #endif
  20.  
  21. #ifndef __TYPES__
  22.     #include <Types.h>
  23. #endif
  24.  
  25. #ifndef __QUICKDRAW__
  26.     #include <Quickdraw.h>
  27. #endif
  28.  
  29.  
  30. #include "ToolAPI.h"
  31. #include "ModApp.h"
  32.  
  33.  
  34. // === Public routines
  35.  
  36. OSErr ToolStartup (WindowPtr wp)
  37. {
  38.     DrawingWindowPeek    aWindow = (DrawingWindowPeek)wp;
  39.     
  40.     // Don't bother adding anything to the tool window's block, as we don't have any private info
  41.     aWindow->toolRoutines.shutdownProc = NULL;
  42.     aWindow->toolRoutines.menuAdjustProc = NULL;
  43.     aWindow->toolRoutines.menuDispatchProc = NULL;
  44.     aWindow->toolRoutines.toolIdleProc = NULL;
  45.     aWindow->toolRoutines.toolUpdateProc = ToolUpdate;
  46.     aWindow->toolRoutines.toolClickProc = NULL;
  47.     aWindow->toolRoutines.toolWindowMovedProc = NULL;
  48.     aWindow->toolRoutines.toolWindowResizedProc = NULL;
  49.     aWindow->toolRoutines.toolWindowActivateProc = NULL;
  50.  
  51.     return noErr;
  52. }
  53.  
  54.  
  55. void ToolShutdown (WindowPtr wp)
  56. {
  57.     #pragma unused(wp)
  58. }
  59.  
  60.  
  61. void ToolMenuAdjust (WindowPtr wp)
  62. {
  63.     #pragma unused(wp)
  64. }
  65.  
  66.  
  67. void ToolMenuDispatch (WindowPtr wp, short menuID, short itemID)
  68. {
  69.     #pragma unused(wp, menuID, itemID)
  70. }
  71.  
  72.  
  73. void ToolIdle (WindowPtr wp)
  74. {
  75.     #pragma unused(wp)
  76. }
  77.  
  78.  
  79. void ToolUpdate (WindowPtr wp)
  80. {
  81.     Rect    scratch = wp->portRect;
  82.     
  83.     InsetRect(&scratch, 10, 10);
  84.     InvertRect(&scratch);
  85. }
  86.  
  87.  
  88. void ToolWindowClick(WindowPtr wp, EventRecord *theEvent)
  89. {
  90.     #pragma unused(wp, theEvent)
  91. }
  92.  
  93.  
  94. void ToolWindowMoved(WindowPtr wp)
  95. {
  96.     #pragma unused(wp)
  97. }
  98.  
  99.  
  100. void ToolWindowResized(WindowPtr wp)
  101. {
  102.     #pragma unused(wp)
  103. }
  104.  
  105.  
  106. void ToolWindowActivate(WindowPtr wp, Boolean activeFlag)
  107. {
  108.     #pragma unused(wp, activeFlag)
  109. }
  110.